/*function chkform_weixin(){
	if(zeai.str_len(weixin2.value)>30 || zeai.str_len(weixin2.value)<2){zeai.msg('请填写您正确的微信号',weixin2);return false;}
	zeai.ajax({"url":MHOST+"/my_cert"+zeai.extname,"form":ZEAIFORM},function(e){var rs=zeai.jsoneval(e);
		zeai.msg(rs.msg);
		if (rs.flag == 1)setTimeout(function(){zeai.openurl(MHOST+"/my_cert"+zeai.extname);},1000);
	});
}
*//*QQ*/
function yzmInit(json) {
	var obj=json.obj,btn=json.btn,S=json.S,T=json.T;
	if (!zeai.empty(o(btn))){
		btn.onclick = function(){
			if (!zeai.empty(obj.value)){
				if (!this.hasClass('disabled')){
					obj.disabled = true;
					btn.addClass('disabled');
					zeai.ajax({"url":json.url,"data":{"submitok":"ajax_cert_"+obj.id+"_yzm_get","value":obj.value}},function(e){var rs=zeai.jsoneval(e);
						zeai.msg(rs.msg);
						if (rs.flag == 1){
							yzmTime(S);
						}else{
							obj.disabled = false;
							btn.removeClass('disabled');
						}
					});
				}
			}else{
				zeai.msg(T);
				return false;
			}
		}
	}
	function yzmTime(S) { 
		if (S == 0) {
			obj.disabled = false;
			btn.removeClass('disabled');
			btn.html('重新获取验证码'); 
			return;
		} else { 
			if (!zeai.empty(btn)){
				btn.addClass('disabled');
				btn.html("重新获取<font>(" + S + ")</font>"); 
				S--; 
			}else{return;}
		}
		setTimeout(function(){yzmTime(S)},1000);
	}
	if (!zeai.empty(o('submitbtn_'+obj.id))){
		o('submitbtn_'+obj.id).onclick = function(){
			if(zeai.empty(obj.value)){zeai.msg(T,obj);return false;}
			if(!zeai.ifint(verify.value)){zeai.msg('请输入验证码',verify);return false;}
			zeai.ajax({"url":json.url,"data":{"submitok":"ajax_cert_"+obj.id+"_yzm_submit","value":obj.value,"verify":verify.value}},function(e){var rs=zeai.jsoneval(e);
				zeai.msg(rs.msg);
				if (rs.flag == 1)setTimeout(function(){zeai.openurl(MHOST+"/my_cert"+zeai.extname);},1000);
			});
		}
	}
}

function chkinputmob(){
	var obj=o('submitbtn_rz'),mob=o('mob');
	if (!zeai.empty(mob.value)){
		reset_rz.show();
	}else{
		reset_rz.hide();
	}
}
function chkform_verify(){
	if(!zeai.ifmob(mob.value)){zeai.msg('请输入正确的【手机号码】',mob);return false;}
	if(!zeai.ifint(verify.value)){zeai.msg('请输入【验证码】',verify);return false;}
	zeai.ajax({url:HOST+'/m/my_cert'+zeai.extname,data:{submitok:"ajax_cert_mob_addupdate",mob:mob.value,verify:verify.value}},function(e){var rs=zeai.jsoneval(e);
		zeai.msg(rs.msg)
		if (rs.flag == 1){setTimeout(function(){zeai.openurl('my_cert.php');},2000);}
	});
}
function chkform_sfz(truename,identitynum){
	truename=truename.replace(/\*/g,"");
	identitynum=identitynum.replace(/\*/g,"");
	if(zeai.str_len(truename)>20 || zeai.str_len(truename)<4){zeai.msg('请填写您本人真实姓名');return false;}
	if(!zeai.ifsfz(identitynum)){zeai.msg('请填写您本人真实身份证号码');return false;}
	return true;
}
//传统
function chkform_identity(){
	if(!chkform_sfz(truename.value,identitynum.value))return false;
	if (zeai.empty(sfz1.value) || zeai.empty(sfz2.value)){zeai.msg('您上传身份证正反面照片');return false;}
	zeai.ajax({"url":HOST+"/m/my_cert"+zeai.extname,form:ZEAIFORM},function(e){var rs=zeai.jsoneval(e);
		if (rs.flag == 1){
			sfz1.value='';sfz2.value='';
			setTimeout(function(){zeai.openurl('my_cert.php');},2000);
		}else{
			zeai.msg(rs.msg);
		}
	});
}
function chkform_identity_mob3(){
	if(!chkform_sfz(truename.value,identitynum.value))return false;
	//正在实名验证
	zeai.ajax({url:HOST+'/m/my_cert'+zeai.extname,data:{submitok:'ajax_cert_identity_mob3_update',truename:truename.value,identitynum:identitynum.value}},function(e){var rs=zeai.jsoneval(e);
		if (rs.flag == 1){
			zeai.msg(rs.msg);
			setTimeout(function(){zeai.openurl('my_cert.php');},2000);
		}else if(rs.flag == 2){
			location.reload(true);
		}else{
			zeai.alert('<center class="S18 B">温馨提醒</center><br><center class="S18 B">很遗憾！实名认证未通过！</center><br>请认证核对信息，信息是否真实无误，若提交信息不能通过，请联系专属红娘或客服协助认证<br><font class="S12 Cf00">（姓名+手机+身份证号必须本人才能通过验证）</font><br><br>',function(){ZeaiM.div({obj:btmKefuBox,w:26,h:28});},'联系红娘',{title:'朕知道了',url:function(){location.reload(true);}})
		}
	});
}
//人脸
function chkform_photo_rz(){
	if(!chkform_sfz(truename.value,identitynum.value))return false;
	//zeai.msg('正在真人验证',{time:8});
	zeai.ajax({url:HOST+'/m/my_cert'+zeai.extname,data:{formphoto:formphoto.value,submitok:'ajax_cert_photo_update',truename:truename.value,identitynum:identitynum.value}},function(e){var rs=zeai.jsoneval(e);
		if (rs.flag == 1){
			zeai.msg(rs.msg);
			setTimeout(function(){zeai.openurl('my_cert.php');},2000);
		}else if(rs.flag == 2){
			location.reload(true);
		}else{
			zeai.alert('<center class="S18 B">温馨提醒</center><br><center class="S18 B">很遗憾！真人认证未通过！</center><br>请认证核对信息，信息是否真实无误，若提交信息不能通过，请联系专属红娘或客服协助认证<br><font class="S12 Cf00">（姓名+身份证+自拍照必须本人才能通过验证）</font><br><br>',function(){ZeaiM.div({obj:btmKefuBox,w:26,h:28});},'联系红娘',{title:'朕知道了',url:function(){location.reload(true);}})
		}
	});
}
function chkform_t(objstr){
	var ot;
	switch (objstr) {
		case 'edu':ot= '本人学历证书';break;
		case 'car':ot= '本人名下汽车行驶证';break;
		case 'house':ot= '本人名下房产证';break;
		case 'love':ot= '本人单身证明或离婚证';break;
		case 'pay':ot= '本人收入证明/工资流水';break;
	}
	if (zeai.empty(path_b.value)){zeai.msg('请上传'+ot);return false;}
	zeai.ajax({"url":HOST+"/m/my_cert"+zeai.extname,form:ZEAIFORM},function(e){var rs=zeai.jsoneval(e);
		zeai.msg(0);zeai.msg(rs.msg);
		if (rs.flag == 1)setTimeout(function(){zeai.openurl('my_cert.php');},2000);
	});
}